﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace GoPlay.Models
{
    public class Player : IEntity
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        [DataType(DataType.Text)]
        [Display(Name = "Goals")]
        public int Goals { get; set; }

        [DataType(DataType.Text)]
        [Display(Name = "Assists")]
        public int Assists { get; set; }

        [DataType(DataType.Text)]
        [Display(Name = "Points")]
        public int Points { get; set; }

        // Foreign key to UserProfile in Membership Services
        [ForeignKey("UserProfile")]
        public int UserId { get; set; }
        public virtual UserProfile UserProfile { get; set; }

        // Foreign key to Team
        [ForeignKey("Team")]
        public int TeamId { get; set; }
        public Team Team { get; set; }

        // Foreign key to Contact
        [ForeignKey("Contact")]
        public int ContactId { get; set; }
        public virtual Contact Contact { get; set; }
    }
}